import request from '@/router/axios';

export const getList = (page, size, params) => {
  return request({
    url: '/base/integralLog/list',
    method: 'post',
    params: {
      ...params,
      page,
      size,
    }
  })
}
export const remove = (id) => {
  return request({
    url: '/base/integralLog/delete',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      id,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/base/integralLog/add',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: row
  })
}

export const list = (page,size,params) => {
  return request({
    url: '/base/storeIntegralLog/list',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
        page,size,...params
    }
  })
}

export const update = (row) => {
  return request({
    url: '/base/integralLog/edit',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: row
  })
}

export const changeStatus = (userId, status) => {
  return request({
    url: '/base/integralLog/changeStatus',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      userId,
      status
    }
  })
}

export const saveUpdateIntergral = (params) => {
  return request({
    url: '/account/userAccount/updateIntegral',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      ...params
    }
  })
}
export const editItemIntergral = (data) => {
  return request({
    url: '/base/storeIntegralLog/editItem',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data:data
  })
}
export  const getTotalIntegral =(id)=>{
  return request({
    url:'/base/store/detail',
    method:'post',
    meta: {
      isSerialize: true,
    },
    data:{
      id
    }
  })
}
